Skip to content

Conversation

matteocapricci
Copy link
Contributor

This pull request introduces a set of functional and structural enhancements to the existing script. The primary objective is to improve the visibility and diagnostic capability of HTTP(S) endpoint checks by incorporating IP:Port resolution and enhanced redirection tracing.
These features were developed as part of a task that required more granular visibility into the behavior and network characteristics of HTTP endpoints.

1) IP:Port Resolution

Introduced a utility function resolve_ip_and_port(url) that resolves the target hostname to its corresponding IP address and determines the port based on URL scheme (http → 80, https → 443, or custom port if specified).
This aids in understanding the actual network endpoint behind each domain and can assist in infrastructure debugging or penetration testing scenarios.

2) Redirection Chain Analysis

URLs that respond with a redirect (e.g., 3xx status codes) now include:

3) Final destination URL

Resolved IP:Port of the redirection target.

This is particularly useful for detecting CDN fronting, load balancing, or domain-level aliasing strategies.

4) Formatted Output Reporting

Output format has been augmented to show:

[Status: 301] [IP: 93.184.216.34:443] https://example.com [Redirect: https://www.example.com (93.184.216.36:443)]
This provides a concise but comprehensive summary per target.

5) Improved Asynchronous Flow

Maintains the use of httpx.AsyncClient with asyncio.as_completed() for efficient concurrent resolution of multiple URLs.

Ensures performance remains scalable with larger URL lists.

6) Graceful Degradation

Robust exception handling ensures that DNS resolution failures or network errors result in a fallback IP:Port Not Found, preserving output consistency without breaking execution.

This new version introduces a set of functional and structural enhancements to the existing StatusChecker.py script. The primary objective is to improve the visibility and diagnostic capability of HTTP(S) endpoint checks by incorporating IP:Port resolution and enhanced redirection tracing.
At the end also the Format Output Reporting.
@BLACK-SCORP10 BLACK-SCORP10 merged commit 5fc805e into BLACK-SCORP10:main May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants